# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : code02.py
# @Time     : 2024/4/6 17:43
# @Author   : Robot-Zsj
"""
description:

input
2
0 0 100 2 2 99 0 2

output

0-1 3-4 6-7
"""


def main():
    minAverageLost = int(input())
    arr = list(map(int, input().split()))
    n = len(arr)
    dp = [0] * n
    dp[0] = arr[0]
    for i in range(1, n):
        dp[i] = dp[i - 1] + arr[i]
    ans = []
    max_len = 0
    for i in range(n):
        for j in range(i, n):
            sumV = dp[j] if i == 0 else dp[j] - dp[i - 1]  # 求出区间[i,j]的和
            long = j - i + 1  # 区间的长度
            lost = long * minAverageLost  # 算出标准
            if sumV <= lost:
                if long > max_len:
                    ans = [[i, j]]
                    max_len = long
                elif long == max_len:
                    ans.append([i, j])
    ans.sort(key=lambda x: x[0])
    if len(ans) == 0:
        return 'NULL'
    else:
        return " ".join(map(lambda x: "-".join(map(str, x)), ans))


print(main())


def draft():
    minAverageLost = int(input())
    arr = list(map(int, input().split()))
    n = len(arr)
    dp = [0] * n
    dp[0] = arr[0]
    for i in range(1, n):
        dp[i] = dp[i - 1] + arr[i]
    max_len = 0
    ans = []
    for i in range(n):
        for j in range(i, n):
            sumV = dp[j] if i == 0 else dp[j] - dp[i - 1]
            long = j - i + 1
            lost = long * minAverageLost
            if sumV <= lost:
                if long > max_len:
                    ans = [[i, j]]
                    max_len = long
                elif long == max_len:
                    ans.append([i, j])
    if len(ans) == 0:
        return "NULL"
    else:
        return " ".join(map(lambda x: "-".join(map(str, x)), ans))


print(draft())
